
<form id="seac" action="<?php echo Yii::app()->request->baseUrl; ?>/so-nguoi-tham-gia" method="post">
    <div class="form_left">Chọn chương trình</div>
    <div class="form_right">
        <?php
        $program = Program::model()->findAll('flag=1');

        $list = CHtml::listData($program, 'gid', 'title');
        echo CHtml::dropDownList('gid', '', $list);
        ?>

    </div>
    <div> <input type="submit" name="yt0" value="Tìm" style="width: 90px;"></div>
</form>
<?php
if (!empty($results)) {
    
    ?>
    <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/js/media/css/demo_table_jui.css" />
    <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/js/examples_support/themes/smoothness/jquery-ui-1.8.4.custom.css" />
    <script type="text/javascript" charset="utf-8">
        $(document).ready(function() {
            oTable = $('#example').dataTable({
                "aaSorting": [[ 0, "desc" ]],//set defall seartd 
                "bJQueryUI": true,
                "sPaginationType": "full_numbers"
            });
        });
    </script>
    <table cellpadding="0" cellspacing="0" border="0" class="display" id="example">
        <thead>
            <tr>
                <th>STT</th>
                <th>Tài khoản</th>
                <th>Chương trình</th>
                <th>Phần quà</th>
                <th>Thời gian login</th>

            </tr>
        </thead>
        <tbody>
            <?php
            //include 'encode_decode.php';

            Yii::import('application.controllers.home.encode_decode');

            if (!empty($results)) {
                foreach ($results as $item) {
                    ?>
                    <tr class="gradeA">
                        <td>
                            <?php echo $item['position']; ?>

                        </td>
                        <td>
                            <?php echo $item['username']; ?>

                        </td>
                        <td><?php echo $item['title']; ?></td>
                        <td>
                            <?php
                            echo $item['name'];
                            ?>
                        </td>
                        <td><?php echo $item['date_log']; ?></td>
                    </tr>
                    <?php
                }
            }
            ?>
        </tbody>
    </table>
    <?php
} else {
    echo 'Chưa có người nào tham gia!';
}

